package com.zhouchao.mvp2.login;

import com.zhouchao.mvp2.entity.User;
import com.zhouchao.mvp2.mvp.IPresenter;
import com.zhouchao.mvp2.mvp.IView;

/**
 * 描述：
 * zhougan
 * 2019/2/28
 **/
public interface LoginContract {
    interface ILoginModel{
        String INVALIDATE_SUCCESS="success";
        String INVALIDATE_FAILURE="failure";

        void login(User user ,Callback callback);
        String invalidate(User user);

        interface Callback{
           void onLoginSuccess();
           void onLoginFailure(String msg);
        }
    }

    interface ILoginView extends IView<ILoginPresenter>{
        String getName();
        String getPwd();
        void onClearText();
        void onLoginSuccess();
        void onLogionFailure(String msg);
        void onProgressBarShow(boolean isShow);
    }

    interface  ILoginPresenter extends IPresenter<ILoginView>{
        void login(String name,String pwd);
        void setProgressVisibility(Boolean visibility);
    }
}
